package action.chap5;

import java.util.Arrays;
import java.util.List;

import static java.util.stream.Collectors.toList;

/**
 * @ClassName Dmoe521
 * @Description Dmoe521
 * @Author 孙峰
 * @Date 2020/4/1 17:10
 * @Version 1.0
 */
public class Demo521 {
    public static void main(String[] args) {

        List<String> asList = Arrays.asList("Java 8", "Lambdas", "In", "Action");
        // 映射 分为两种
       asList.stream()
               .map(String::length)
               .collect(toList())
               .forEach(System.out::println);
    }
}
